<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" >

<%@ include file="../base/taglibs.jsp" %>
<%@ page session="true"%>

<html>
	<%@ include file="../base/head.jsp" %>

	<body>
		<div id="wrap">
			<%@ include file="../snipped/header.jsp"%>
			
			<div id="content">
			
			<a href="<c:url value="/band/edit?id=${band.id}" />">Zpět na detail kapely <b><c:out value="${band.name}"/></b></a>
			<br />
			
			<c:if test="${editMembers}">
			
				<div style="float:left; padding-right: 16px;">
				
				<h3>Členové:</h3>
				<div id="tbody" style="max-height:400px;">
				<table width="100%">
					<tr>
						<th>Nick</th>
						<th>Jméno</th>
						<th>Příjmení</th>
						<th></th>
					</tr>
					
					<c:forEach varStatus="stat" var="m" items="${band.members}">
					<tr class="${stat.index % 2 == 0 ? 'odd' : 'even'}">
						<td><c:out value="${m.nick}"/></td>
						<td><c:out value="${m.name}"/></td>
						<td><c:out value="${m.surname}"/></td>
						<td align="center">
							<a href="<c:url value="/band/removeMember?idM=${m.id}" />">
								<img alt="Odstranit" src="<c:url value="/resources/images/remove.png" />" height="18" /></a>
						</td>
					</tr>
					</c:forEach>
				</table>
				</div>
				<br />
				
				</div>
				
				<h3>Přidat člena:</h3>
				<div id="tbody" style="max-height:400px;">
				<table width="100%">
					<tr>
						<th>Nick</th>
						<th>Jméno</th>
						<th>Příjmení</th>
						<th></th>
					</tr>
					
					<c:forEach varStatus="stat" var="om" items="${otherMembers}">
					<tr class="${stat.index % 2 == 0 ? 'odd' : 'even'}">
						<td><c:out value="${om.nick}"/></td>
						<td><c:out value="${om.name}"/></td>
						<td><c:out value="${om.surname}"/></td>
						<td align="center">
							<a href="<c:url value="/band/addMember?idM=${om.id}" />">
								<img alt="Pridat" src="<c:url value="/resources/images/add.png" />" height="18" /></a>
						</td>
					</tr>
					</c:forEach>
				</table>
				</div>
				
			</c:if>
			
			<c:if test="${editSongs}">
		
				<div style="float:left; padding-right: 16px;">
				
				<h3>Repertoár:</h3>
				<div id="tbody">
				<table width="100%">
					<tr>
						<th>Název CS</th>
						<th>Název orig.</th>
						<th>Autor</th>
						<th>Arranž</th>
						<th></th>
					</tr>
					
					<c:forEach varStatus="stat" var="s" items="${band.songs}">
					<tr class="${stat.index % 2 == 0 ? 'odd' : 'even'}">
						<td><c:out value="${s.nameCs}"/></td>
						<td><c:out value="${s.nameOriginal}"/></td>
						<td><c:out value="${s.author}"/></td>
						<td><c:out value="${s.arrange}"/></td>
						<td align="center">
							<a href="<c:url value="/band/removeSong?idS=${s.id}" />">
								<img alt="Odstranit" src="<c:url value="/resources/images/remove.png" />" height="18" /></a>
						</td>
					</tr>
					</c:forEach>
				</table>
				</div>
				<br />
				
				</div>
				
				<h3>Přidat píseň:</h3>
				<div id="tbody">
				<table width="100%">
					<tr>
						<th>Název CS</th>
						<th>Název orig.</th>
						<th>Autor</th>
						<th>Arranž</th>
						<th></th>
					</tr>
					
					<c:forEach varStatus="stat" var="os" items="${otherSongs}">
					<tr class="${stat.index % 2 == 0 ? 'odd' : 'even'}">
						<td><c:out value="${os.nameCs}"/></td>
						<td><c:out value="${os.nameOriginal}"/></td>
						<td><c:out value="${os.author}"/></td>
						<td><c:out value="${os.arrange}"/></td>
						<td align="center">
							<a href="<c:url value="/band/addSong?idS=${os.id}" />">
								<img alt="Pridat" src="<c:url value="/resources/images/add.png" />" height="18" /></a>
						</td>
					</tr>
					</c:forEach>
				</table>
				</div>
				
			</c:if>

			<c:if test="${editConcerts}">
			
				<div style="float:left; padding-right: 16px;">
				
				<h3>Koncerty:</h3>
				<div id="tbody">
				<table width="100%">
					<tr>
						<th>Místo</th>
						<th>Datum</th>
						<th>Popis</th>
						<th></th>
					</tr>
					
					<c:forEach varStatus="stat" var="c" items="${band.concerts}">
					<tr class="${stat.index % 2 == 0 ? 'odd' : 'even'}">
						<td><c:out value="${c.place}"/></td>
						<td><c:out value="${c.dateTime}"/></td>
						<td><c:out value="${c.description}"/></td>
						<td align="center">
							<a href="<c:url value="/band/removeConcert?idC=${c.id}" />">
								<img alt="Odstranit" src="<c:url value="/resources/images/remove.png" />" height="18" /></a>
						</td>
					</tr>
					</c:forEach>
				</table>
				</div>
				<br />
				
				</div>
				
				<h3>Ostatní koncerty:</h3>
				<div id="tbody">
				<table width="100%">
					<tr>
						<th>Místo</th>
						<th>Datum</th>
						<th>Popis</th>
						<th></th>
					</tr>
					
					<c:forEach varStatus="stat" var="oc" items="${otherConcerts}">
					<tr class="${stat.index % 2 == 0 ? 'odd' : 'even'}">
						<td><c:out value="${oc.place}"/></td>
						<td><c:out value="${oc.dateTime}"/></td>
						<td><c:out value="${oc.description}"/></td>
						<td align="center">
							<a href="<c:url value="/band/addConcert?idC=${oc.id}" />">
								<img alt="Pridat" src="<c:url value="/resources/images/add.png" />" height="18" /></a>
						</td>
					</tr>
					</c:forEach>
				</table>
				</div>
				
			</c:if>
			
				
			</div>
			
			<br />
			<%@ include file="../snipped/footer.jsp"%>
		</div>
	</body>
	
</html>